/*
 * $Id: hstack.h 11 2008-06-06 13:46:04Z dtikhonov $
 *
 * hstack.h: history stack
 */

#ifndef _HSTACK_H_              /* [ */
#define _HSTACK_H_ 1

#include <stdbool.h>
#include <stdint.h>

struct hstack {
    void (*push) (struct hstack *, uint64_t position);
     bool(*prev) (struct hstack *, uint64_t * position);
     bool(*next) (struct hstack *, uint64_t * position);
    void (*truncate) (struct hstack *);

    void (*destroy) (struct hstack *);

    void *ctx;
};
typedef struct hstack hstack_t;

hstack_t *hstack_new(int max_elems);

#endif                          /* ] _HSTACK_H_ */
